<link rel="stylesheet" href="<?php echo $this->baseUrl() ?>/styles/general.css" type="text/css" />
<link rel="stylesheet" type="text/css" media="screen" href="<?php echo $this->baseUrl() ?>/scripts/jquery/jqgrid381/css/ui.jqgrid.css" />
<script type="text/javascript" src="<?php echo $this->baseUrl() ?>/styles/jqgridnew1/js/jquery-ui-1.8.5.custom.min.js" />
<script src="<?php echo $this->baseUrl() ?>/scripts/jquery/jqgrid381/js/i18n/grid.locale-en.js" type="text/javascript"></script>
<script src="<?php echo $this->baseUrl() ?>/scripts/jquery/jqgrid381/js/jquery.jqGrid.min.js" type="text/javascript"></script>


<!--
<script type="text/javascript" src="<?php echo $this->baseUrl() ?>/scripts/libform.js"></script>
<link rel="stylesheet" href="<?php echo $this->baseUrl() ?>/scripts/jquery/greybox/greybox.css" type="text/css" />
<script type="text/javascript" src="<?php echo $this->baseUrl() ?>/scripts/jquery/greybox/greybox.js"></script> 

<p><a href="<?= $this->url(
    array(
        'controller' => 'Guestbook',
        'action'     => 'sign'
    ), 
    'default', 
    true) ?>">Sign Our Guestbook</a></p>
-->
Guestbook Entries: <br />

  <!-- php echo $this->datePicker("dp1", '', array('defaultDate' => date('Y/m/d', time()))); ?-->

<div id="liste">
    <table id="list" class="scroll" cellpadding="0? cellspacing="0?></table>
    <div id="pager" class="scroll" style="text-align:center;"></div>
</div>
<script type="text/javascript">
    $(document).ready(function(){
        $("#list").jqGrid({
            width: 900,
            height: 240,
            autowidth: true, 
            rownumbers: true,
            rownumWidth: 40, 
            url:'<?php echo $this->baseUrl() ?>/guestbook/grid',
            datatype: 'json',
            mtype: 'POST',
            colNames:['No','email','comment'],
            colModel :[
                {name:'id', index:'id',
                    width:55                  
                },
                {name:'email', index:'email',
                    width:50,
                    sortable:true
                },
                {name:'comment', index:'comment',
                    width:50,
                    sortable:true
                }
            ],
            pager: jQuery('#pager'),
            rowNum:30,
            rowList:[10,20,30],
            sortname: 'id',
            sortorder: "asc",
            viewrecords: true,
            viewsortcols: [true,'horizontal',true],
            gridview: false,
            hidegrid: false,
            
            caption: 'Contact list',
            forceFit : true
        });
        $("#list").navGrid("#pager",
        {view:true},
        {top:20,left:150,dataheight:200,width:400,reloadAfterSubmit:false,jqModal:false, closeOnEscape:true,bottominfo:"Fields marked with (*) are required"}, // edit options
        {top:20,left:150,dataheight:200,width:400,reloadAfterSubmit:false,jqModal:false, closeOnEscape:true,bottominfo:"Fields marked with (*) are required"}, // add options
        {top:20,left:150,reloadAfterSubmit:false,jqModal:false, closeOnEscape:true}, // del options
        {top:20,left:150,jqModal:false,closeOnEscape:true}, // search options
        {top:20,left:150,dataheight:200,width:400,jqModal:false,closeOnEscape:true} // view options
    );
    });
    </script>

<dl>
    <!-- Loop through the entries that were provided to us by the controller 
    <  foreach ($this->entries as $entry): ?>
    <dt><= $this->escape($entry['email']) ?></dt>
    <dd><= $this->escape($entry['comment']) ?></dd>
    < endforeach ?>
    -->
</dl>
